<script setup lang="ts">

import {useFormOptions} from "@/hooks/use-form-options"
import {ref} from "vue";

defineOptions({name: 'FormCheckbox'})

interface Props {
  options: any
}

const props = withDefaults(defineProps<Props>(), {
  options: () => ([])
})

const {
  options,
} = useFormOptions()

const internalModel = ref()
</script>

<template>
  <el-checkbox-group
      v-model="internalModel"
  >
    <el-checkbox
        v-for="item in props.options"
        :key="item.value"
        :label="item.label"
        :value="item.value"
    >
    </el-checkbox>
  </el-checkbox-group>
</template>